﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 随机数抽奖工具
{
    public partial class NumInputForm : Form
    {
        public NumInputForm()
        {
            InitializeComponent();
        }

        public int Num { get; set; }
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Trim().Length == 0)
            {
                MessageBox.Show("请输入人数");
                return;
            }
            try
            {
                Num = Convert.ToInt32(textBox1.Text.Trim());
                DialogResult = DialogResult.OK;
            }
            catch
            {
                MessageBox.Show("输入的人数不正确");
                return;
            }
        }
    }
}
